use crate::sbi::shutdown;
use core::panic::PanicInfo;

#[panic_handler]
fn panic(info: &PanicInfo) -> ! {
    #[cfg(feature = "panic_info_message")]
    {
        if let Some(message) = info.message() {
            println!("Panicked: {}", message);
        } else {
            println!("Panicked without a message");
        }
    }
    crate::sbi::shutdown();
    loop{}
}
